package com.leetcode.August;

/**
 * @Description: 392. 判断子序列
 * @Author: Mr.Fxy
 * @CreateTime: 2024-08-23 10:19
 */
public class LC392判断子序列 {
    public boolean isSubsequence(String s, String t) {
        int i,j;
        for (i = 0,j=0; i < s.length() && j < t.length(); j++){
            if (s.charAt(i) == t.charAt(j)){
                i++;
            }
        }
        return i>=s.length();
    }
}
